<template>
  <el-image :lazy="true" :src="src"></el-image>
</template>

<script setup lang="ts">
const props = defineProps({
  source: {
    type: [String, File],
  },
  width: {
    type: Number,
  },
  fit: {
    type: String,
    default: 'scale-down',
  },
  preview: {
    type: Boolean,
    default: false,
  },
  defaultImg: {
    type: String,
  },
  img404: {
    type: String,
    default: '404_cover.png',
  },
  borderRadius: {
    type: String,
    default: '5px',
  },
  lazy: {
    //顶部头像使用lazy页面不跳转路由切换不加载图片
    type: Boolean,
    default: true,
  },
  scale: {
    type: Number,
    default: 0.6,
  },
})
</script>

<style scoped lang="scss"></style>
